package org.example.system.dubbo;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.example.api.system.RemoteLoginLogService;
import org.example.api.system.domain.bo.RemoteLoginLogBo;
import org.example.common.core.utils.MapstructUtils;
import org.example.system.domain.bo.SysLoginLogBo;
import org.example.system.service.ISysLoginLogService;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@DubboService
@RequiredArgsConstructor
public class RemoteLoginLogServiceImpl implements RemoteLoginLogService {

    private final ISysLoginLogService loginLogService;

    @Override
    public void saveLoginLog(RemoteLoginLogBo logininfor) {
        SysLoginLogBo sysLoginLogBo = MapstructUtils.convert(logininfor, SysLoginLogBo.class);
        loginLogService.insertLogininfor(sysLoginLogBo);
    }
}
